<?php
namespace Home\Model;
use Think\Model;
class UserInfoModel extends CommonModel {
	
	public function getHeadImg($user_id){
		$wechatUserInfo = D('WechatUserInfo');
		$db_res = $wechatUserInfo->where("user_id = '".$user_id."'")->find();
		if(empty($db_res)||empty($db_res['headimgurl'])){
			return C('DEFAULT_HEAD_IMG');
		}else{
			return $db_res['headimgurl'];
		}
	}
	
}

?>